package com.ruyuan.engine.pojo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;

/**
 * 封装组合 + 顺序组合的复杂规则
 * */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RuleComplexParam implements Serializable {
    private String ruleName;
    private String ruleId;

    //被触发的条件
    private RuleEventExecuteParam trigger;

    //基本规则
    private HashMap<String,String> baseRuleParams;

    //组合规则
    private List<RuleEventExecuteParam> combinationRuleParams;

    //指定顺序的组合规则
    private List<RuleEventExecuteParam> sequenceRuleParams;

    //组合事件顺序记录值
    private int sequenceRuleLastStep;

    //组合规则的动态sql
    private String sequenceRuleDynamicSql;

    //是否需要注册timer
    private boolean isRegisterTimer;

    /**
     * 关于定时器：
     *      单一规则，组合规则，顺序组合规则（都有可能需要定时触发）
     * */
    private List<TriggerTimer> triggerTimers;

    //合并组合规则
    private List<CombinationRuleParam> combinationRuleList;

}
